/**
 * User: alesj
 * Date: 2005.2.23
 * Time: 12:00:28
 * 
 * (C) Genera Lynx d.o.o.
 */

package com.generalynx.ecos.db.datasource;

import org.apache.commons.dbcp.BasicDataSource;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.Log;

/**
 * Only used to log the database url and driver.
 */
public class InfoBasicDataSource extends BasicDataSource {

    private static final Log logger = LogFactory.getLog(InfoBasicDataSource.class);

    public synchronized void setDriverClassName(String s) {
        super.setDriverClassName(s);
        logger.info("Driver: " + s);
    }

    public synchronized void setUrl(String s) {
        super.setUrl(s);
        logger.info("Database url: " + s);
    }
}
